#include "figure.h"
#include <iostream>
#include <cstring>

Figure::Figure(std::vector<double> &_data)
{
    for (size_t i = 0; i < _data.size(); ++i) {
        data.push_back(_data[i]);
    }
}

void Figure::setData(std::vector<double> &_data)
{
    for (size_t i = 0; i < _data.size(); ++i) {
        data[i] = _data[i];
    }
}

std::vector<double> Figure::getData()
{
    return data;
}

void Figure::extension(double coefficient)
{
    data[2] *= coefficient; // a
    data[3] *= coefficient; // b
}

void Figure::shift(double coefficient1, double coefficient2)
{
    data[0] += coefficient1; // x
    data[1] += coefficient2; // y
}


void Figure::turn(double angle)
{
    data[data.size() - 1] += angle;
}

Figure::~Figure()
{

}
